<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<link rel="stylesheet" href="lib/css/animate.css">
	<!-- 入场 bounceIn 离场 bounceOut -->
</head>
<body>
<div id="app">
	<input type="button" value="toggle" @click="flag=!flag">
	<!-- 需求：点击按钮，让h3显示，再点击，让h3隐藏 -->
	<!-- 1.使用transition元素，把需要被动画控制的元素，包裹起来 -->
	<!-- transition元素,是Vue官方提供的 -->
	<!-- <transition enter-active-class="zoomIn" leave-active-class="zoomOut" :duration="100">
		<h3 v-if="flag" class="animated">这是一个H3</h3>
	</transition> -->

	<!-- 使用 :duration="{enter:100, leave:500}"，来分别设置 入场的时长 和 离场的时长 -->
	<transition enter-active-class="zoomIn" leave-active-class="zoomOut" :duration="{enter:100, leave:500}">
		<h3 v-if="flag" class="animated">这是一个H3</h3>
	</transition>
</div>
<script src="node_modules/vue/dist/vue.js"></script>
<script>
	var app = new Vue({
		el:'#app',
		data:{
			flag:false,
			flag2:false
		}
	})
</script>
</body>
</html>